/**
 * I don't know why the formula is correct but the answer notices me wrong !!! 
 * @author TrinhNX
 *
 */
public class Euler006 {

	public static void main(String[] args) {
		// Firt, about math
		// sum of n = n*(n+1)/2
		final int MARK = 1000;
		int sum1 = 0;
		int i = 1;
		while (i <= MARK) {
			sum1 = sum1 + i;
			i = i + 1;
		}
		System.out.println(sum1);

	}
}
